<template>
  <div class="edu-page-warp">
    <div class="edu-page-title">
      {{$t('message.add-authority')}}
    </div>
    <el-card shadow="never" body-style="padding: 24px;">
      <el-form ref="form" :model="form" label-width="80px">
        <el-row :gutter="20">
          <el-col :span="6">
            <el-form-item label="年级">
              <el-select v-model="form.region" placeholder="请选择年级" style="width: 100%">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="生效时间">
              <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="失效时间">
              <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="培养类别">
          <el-checkbox-group v-model="form.type">
            <el-checkbox label="全选" name="type"></el-checkbox>
            <el-checkbox label="学位生" name="type"></el-checkbox>
            <el-checkbox label="双学位生" name="type"></el-checkbox>
            <el-checkbox label="学历学位生" name="type"></el-checkbox>
            <el-checkbox label="旁听生" name="type"></el-checkbox>
            <el-checkbox label="借读生" name="type"></el-checkbox>
            <el-checkbox label="课程进修生（境外）" name="type"></el-checkbox>
            <el-checkbox label="进修生（境内）" name="type"></el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="学生类型">
          <el-checkbox-group v-model="form.type1">
            <el-checkbox label="全选" name="type"></el-checkbox>
            <el-checkbox label="本科生" name="type"></el-checkbox>
            <el-checkbox label="研究生" name="type"></el-checkbox>
            <el-checkbox label="国际学生" name="type"></el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="学院">
          <el-transfer v-model="value1" :data="data"></el-transfer>
        </el-form-item>
        <el-form-item label="所属部门">
          <el-transfer v-model="value1" :data="data"></el-transfer>
        </el-form-item>
        <div class="text-right">
          <el-button>取消</el-button>
           <el-button type="primary">创建权限</el-button>
        </div>
      </el-form>
    </el-card>
  </div>
</template>
<script>
export default {
  name: "addAuthority",
  data() {
    const generateData = _ => {
        const data = [];
        for (let i = 1; i <= 15; i++) {
          data.push({
            key: i,
            label: `备选项 ${ i }`,
            disabled: i % 4 === 0
          });
        }
        return data;
      };
      return {
        data: generateData(),
        value1: [1, 4],
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        }
      }
    }
};
</script>
<style lang="scss" scoped>
</style>
